1. Field of the Invention
The present invention relates to a method and system for testing software for an industrial machine, and more particularly, to a method and system for testing software for an industrial machine with continuous test values reflecting actual environmental factors by using a simulator before the software for the industrial machine is embedded into an actual industrial machine.
2. Description of the Related Art
When coding software for an industrial machine, diagrams such as a programmable logic controller (PLC), a ladder diagram (LD), a function block diagram (FBD) and a sequential function chart (SFC) are used. Each of the diagrams is compiled into a code or instruction capable of driving the industrial machine by a compiler, based on requirements or standards accompanied by the diagrams. The compiled program is directly downloaded onto the industrial machine, and it is then tested whether or not the downloaded program is properly operated.
FIG. 1 is a flowchart illustrating a method for testing software for an industrial machine according to a related art.
Referring to FIG. 1, a program is first coded through a diagram such as LD, FBD or SPC (step 100). The coded program is then compiled by a compiler (step 110). The compiled program is directly embedded onto an industrial machine such as PLC (step 120). The industrial machine having the embedded program is tested for a predetermined time (step 130). If an error is found through the testing, the original code or program is modified by detecting the error (step 160). The steps of compiling, embedding and testing are repeated through the modified code or program. If no error is detected, the testing is finished (step 150).
As can be seen in the related art, after the program is verified with respect to its logic to some degree, it is immediately compiled and then embedded onto the industrial machine to be tested. Conventionally, industrial machines had a small scale and a low complexity of design. Hence, testing was sufficiently performed only by downloading a program to the industrial machine and making a trial operation of the industrial machine for some months. However, as industrial machines gradually become larger in size and more accurate, the complexity of logics for controlling the industrial machines is increased. Therefore, when using the related art method for testing software for industrial machines by actually downloading a compiled program to the industrial machines, it takes a long time for testing. In addition, since the testing is performed using actual industrial machines, it is almost impossible to test a program in consideration of various environmental factors as parameters.
When testing is performed using the related art method, data required in the testing are inputted one by one in a developing tool, and hence, it takes a long time for testing. Further, in a simulator provided from the developing tool, only logic verification for diagram engineering is possible, but system verification for diagram engineering is impossible.